home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "Form1"
- ClientHeight = 3750
- ClientLeft = 1080
- ClientTop = 1965
- ClientWidth = 7365
- Height = 4155
- Left = 1020
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- ScaleHeight = 3750
- ScaleWidth = 7365
- Top = 1620
- Width = 7485
- Sub Form_Load ()
- On Error GoTo FormLoadError
- CR$ = Chr$(13) + Chr$(10)
- '------ Remove the message box call below and insert your own code.
- Msg$ = "This is a quick start shell for VqString array functions." + CR$
- Msg$ = Msg$ + "See the Form Load procedure for example code."
- MsgBox Msg$, 64, "VqStrings"
- '******** Initialize variable length VqString array ********
- '------ To use variable length VqString array, set the values
- '------ of Elements And BufSize And un-comment the
- '------ initialization call below.
- 'x& = VqVarLenStr(Test, 1, Elements, Bufsize)
- '******** Initialize fixed length VqString array ********
- '------ To use fixed length VqString array, set the values
- '------ of Elements And BufSize And un-comment the
- '------ initialization call below.
- 'x& = VqFixLenStr(Test, 1, Elements, StrSize)
- '------ Example call to store a string in a variable length VqString array.
- 'If VqPutVarString(Test, Handle%, Element&) < 0 Then Error Abs(VqError)
- '------ Example call to get a string from a variable length VqString array.
- 'If VqGetVarString(Test, Handle%, Element&) < 0 Then Error Abs(VqError)
- '------ Example call to store a string in a fixed length VqString array.
- 'If VqFixLenStr(Test, Handle%, Element&, VqPutString) < 0 Then Error Abs(VqError)
- '------ Example call to get a string from a fixed length VqString array.
- 'If VqFixLenStr(Test, Handle%, Element&, VqGetString) < 0 Then Error Abs(VqError)
- '******** Erase VqString arrays ********
- '------ After using VqString array, un-comment the appropriate
- '------ erase call.
- 'x& = VqFixLenStr(Test, 1, 0, VqEraseString)
- 'x& = VqVarLenStr(Test, 1, 0, VqEraseString)
- FormLoadError:
- MsgBox Error$, 0, "Error"
- End Sub
- Function VqGetVarString (Strng$, Handle%, Page&)
- 'Support function to get string from variable length
- ' VqString array.
- x% = VqVarLenStr(Strng$, Handle%, Page&, VqVarGetSize)
- If x% < 0 Then
- VqGetVarString = x%
- VqError = x%
- Exit Function
- End If
- Strng$ = Space$(x%)
- x% = VqVarLenStr(Strng$, Handle%, Page&, VqGetString)
- If x% < 0 Then
- VqGetVarString = x%
- VqError = x%
- Exit Function
- End If
- VqGetVarString = 0
- VqError = 0
- End Function
- Function VqPutVarString (Strng$, Handle%, Page&)
- 'Support function to store string in variable length
- ' VqString array.
- '------ Need to append Chr$(0) to end of string.
- Strng$ = Strng$ + Chr$(0)
- x% = VqVarLenStr(Strng$, Handle%, Page&, VqPutString)
- If x% < 0 Then
- VqPutVarString = x%
- VqError = x%
- Exit Function
- End If
- VqPutVarString = 0
- VqError = 0
- End Function
-